/**
 * 
 */
package com.google.code.netz.wfe.model;

/**
 * State in a workflow is defined distribution of Tokens over Places.
 * 
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id: State.java 17 2009-02-09 13:08:49Z rahul.thakur.xdev $
 */
public enum State {

	/**
	 * Default state; this is the intial state for any entity.
	 */
	STATE_DEFAULT("Default"),

	/**
	 * Stopped state.
	 */
	STATE_STOPPED("Stopped"),

	/**
	 * Enabled state. Implies that the Petri-net entity is ready to service
	 * requests.
	 */
	STATE_ENABLED("Enabled"),

	/**
	 * Running state. Implies that the Petri-net entity is in middle of
	 * servicing a request.
	 */
	STATE_RUNNING("Running"),

	/**
	 * Suspended state. Implies that the Petri-Net entity has started servicing
	 * the request but the servicing is currently suspended.
	 */
	STATE_SUSPENDED("Suspended"),

	/**
	 * Disabled state; Applies only to Workflows. Implies that the workflow is
	 * currently disabled and will not entertain processing of any
	 * {@link CaseImpl} s.
	 */
	STATE_DISABLED("Disabled"),

	/**
	 * Completed state. Implies that the Petri-Net entity has completed its
	 * processing.
	 */
	STATE_COMPLETED("Completed"),

	/**
	 * Applies to ITask. Implies that the Petri-Net entity encountered an error
	 * while servicing a request.
	 */
	STATE_FAILED("Failed"),

	/**
	 * Applies to ITask.
	 */
	STATE_IN_ERROR("in Error");

	private String state;

	/**
	 * @param state
	 */
	private State(String state) {
		this.state = state;
	}

	public String getState() {
		return this.state;
	}

}